package com.test.web;

import com.test.common.Config;

/**
 * Created by Administrator on 2017/6/19.
 */
public enum Browsers {

    /**
     * Chrome 浏览器.
     */
    Chrome("webdriver.chrome.driver",Browsers.class.getClassLoader().getResource("chromedriver-30.exe").getPath()),
    /**
     * Firefox 浏览器.
     */
    Firefox("webdriver.firefox.bin", Config.get("web.properties","FireFoxPath")),
    /**
     * Internet explorer 浏览器.
     */
    InternetExplorer("webdriver.ie.driver","webDriver\\IEDriverServer.exe"),
    /**
     * Html unit 内置浏览器.
     */
    HtmlUnit(null,null);

    private String key ;
    private String value;

    private Browsers(String key,String value){
        this.key=key;
        this.value=value;
    }

    /**
     * Gets value.
     *
     * @return the value
     */
    public String getValue() {
        return value;
    }

    /**
     * Sets value.
     *
     * @param value the value
     */
    public void setValue(String value) {
        this.value = value;
    }

    /**
     * Gets key.
     *
     * @return the key
     */
    public String getKey() {
        return key;
    }

    /**
     * Sets key.
     *
     * @param key the key
     */
    public void setKey(String key) {
        this.key = key;
    }
}
